Skip to content

refactor: simplify Node installation guidance - #60

Merged
mldangelo merged 14 commits into
mainfrom
mdangelo/codex/python-wrapper-help-pr
Oct 8, 2026
Merged

mldangelo merged 14 commits into
mainfrom
mdangelo/codex/python-wrapper-help-pr

Conversation

@mldangelo-oai

@mldangelo-oai mldangelo-oai commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

The missing-Node help now uses the detected platform and deployment context to show a shorter installation guide. It preserves the existing Python image for Debian and Ubuntu containers, accounts for Amazon Linux compatibility and serverless hosting restrictions, and distinguishes hosted functions from local development. Kubernetes receives container guidance.

Windows verification and direct usage use npx.cmd, with an npx.exe alternative for compatible Node managers. The Docker check installs a packed fixture so a non-root npm prefix does not link to root-owned source files. The duplicate release FAQ now links to the existing versioning policy.

Validation: Ruff, mypy, pyright, actionlint, 195 unit tests, 20 installed-wrapper npx smoke tests, the actual missing-Node CLI path, and wheel/sdist builds pass locally. Four Windows smoke cases are platform-skipped locally. Fresh PR CI validates the five Linux container configurations, Windows PowerShell/Git Bash commands, and the Python/Node global-install and npx-fallback matrices. A local Docker daemon and native Windows are unavailable.

@mldangelo-oai
mldangelo-oai requested a lite review from Copilot September 18, 2026 21:58
@mldangelo-oai

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-18T22:01:50.622091Z 2c329b5 Manual request
🔒 Security Review ✅ Completed 2026-09-18T22:01:15.114318Z 2c329b5 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Comment on lines +59 to +61
"Keep an existing writable npm prefix only if its bin is separate from Python's scripts directory. "
"If its bin is missing from PATH, add it before /usr/bin "
"and after your Python scripts (for example /opt/venv/bin or /usr/local/bin).",
Comment on lines +62 to +64
"If an inherited NPM_CONFIG_PREFIX points to an unwritable directory, change it in the Dockerfile "
"(for example `ENV NPM_CONFIG_PREFIX=/home/app/.npm-global`). Without that override, a non-root user "
"can run `npm config set prefix ~/.npm-global`. Add the writable bin to PATH in either case.",
Comment on lines +77 to +78
" RUN dnf --releasever=latest install -y nodejs24 nodejs24-npm "
"&& /usr/sbin/alternatives --set node /usr/bin/node-24 && dnf clean all",
Comment on lines +79 to +80
"Node 24 requires repository release 2023.9.20251110 or newer; replace latest with your approved recent "
"snapshot, or update an older base image before installing.",
Comment on lines +112 to +113
"If your pinned repository is older than 2023.9.20251110, update the base/repository or install from a "
"newer approved snapshot: sudo dnf --releasever=latest install -y nodejs24 nodejs24-npm",
Comment on lines +149 to +150
"If you choose a container image instead, create a new image-based function "
"and install Node at build time.",

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Serverless guidance still includes misleading runtime installation instructions.

Review effort: Lite
Findings: None

What changed in this PR

Refactors Node.js installation guidance to be shorter and deployment-aware across platforms, containers, serverless environments, CI, and Windows.

Changes:

  • Simplifies environment detection and installation instructions.
  • Adds Kubernetes, Docker, distribution-specific, serverless, and Windows guidance.
  • Expands Docker and platform validation tests.
  • Replaces the duplicate release FAQ with the versioning policy link.
File Description
tests/​test_instructions.py Updated instruction coverage.
tests/​test_environment.py Updated environment detection tests.
tests/​smoke/​test_installation.py Added Windows command smoke tests.
src/​promptfoo/​instructions.py Generates contextual Node.js guidance.
src/​promptfoo/​environment.py Simplifies environment detection.
AGENTS.md Consolidates release FAQ guidance.
.github/​workflows/​test.yml Validates generated Dockerfiles.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@chatgpt-codex-connector

Copy link
Copy Markdown

🛡️ Codex Security Review · Automatically triggered

Security review completed. No security issues were found in this pull request.

Reviewed commit: 2c329b52a7

View security finding report

Only the user who started this review can view the report in Codex.

ℹ️ About Codex security reviews in GitHub

This is an experimental Codex feature. Security reviews are triggered when:

  • You comment "@codex security review"
  • A regular code review gets triggered (for example, "@codex review" or when a PR is opened), and you’re opted in so security review runs alongside code review

Once complete, Codex will leave suggestions, or a comment if no findings are found.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Can't wait for the next one!

Reviewed commit: 2c329b52a7

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@mldangelo mldangelo left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed platform detection and installation guidance, including source-only serverless handling, Python image preservation, writable npm prefixes, and Windows launchers. Fixed the non-root Docker fixture install and updated the Windows help expectation. Local Ruff, mypy, pyright, actionlint, 195 unit tests, 20 installed-wrapper smoke tests, missing-Node CLI help, and wheel/sdist builds pass. All 18 current-head GitHub checks pass, including Docker and Windows validation.

@mldangelo
mldangelo merged commit d76bd32 into main Oct 8, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants